import orderService from "@/apis/order";

// components/float-record/float-record.js
Component({

  /**
   * 组件的属性列表
   */
  properties: {

  },

  /**
   * 组件的初始数据
   */
  data: {
    isRecording: false
  },

  /**
   * 组件的方法列表
   */
  methods: {
    stopRecording() {
      const app = getApp();
      this.setData({
        isRecording: false
      })
      app.globalData.recorderManager.stop();
    }
  },

  lifetimes: {
    attached() {
      const app = getApp();
      this.setData({
        isRecording: app.globalData.isRecording 
      })
      console.log("float-record attached: "+app.globalData.isRecording)
      console.log("float-record attached: "+this.data.isRecording)
    }
  },
  pageLifetimes: {
    show() {
      const app = getApp();
      this.setData({
        isRecording: app.globalData.isRecording 
      })
      console.log("float-record show: "+app.globalData.isRecording)
      console.log("float-record show: "+this.data.isRecording)
    }
  }
})